<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>wickr-crypto-c: Wickr_ctx</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">wickr-crypto-c
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.15 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Wickr_ctx</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structwickr__ctx.html">wickr_ctx</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Wickr encryption context for high level management of sending / receiving packets using the Wickr protocol.  <a href="structwickr__ctx.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structwickr__ctx__gen__result.html">wickr_ctx_gen_result</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">the output of a context generation  <a href="structwickr__ctx__gen__result.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structwickr__ctx__packet.html">wickr_ctx_packet</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">a parsed inbound wickr packet that has yet to be decoded by this context  <a href="structwickr__ctx__packet.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gaa8904ab3687a22f8d291f5976d05a0e5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structwickr__ctx__gen__result.html">wickr_ctx_gen_result_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wickr__ctx.html#gaa8904ab3687a22f8d291f5976d05a0e5">wickr_ctx_gen_new</a> (const <a class="el" href="structwickr__crypto__engine.html">wickr_crypto_engine_t</a> engine, <a class="el" href="structwickr__dev__info.html">wickr_dev_info_t</a> *dev_info, <a class="el" href="structwickr__buffer.html">wickr_buffer_t</a> *identifier)</td></tr>
<tr class="separator:gaa8904ab3687a22f8d291f5976d05a0e5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga458f74fb060fb98da491d733e51fc3ef"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structwickr__ctx__gen__result.html">wickr_ctx_gen_result_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wickr__ctx.html#ga458f74fb060fb98da491d733e51fc3ef">wickr_ctx_gen_new_with_sig_key</a> (const <a class="el" href="structwickr__crypto__engine.html">wickr_crypto_engine_t</a> engine, <a class="el" href="structwickr__dev__info.html">wickr_dev_info_t</a> *dev_info, <a class="el" href="structwickr__ec__key.html">wickr_ec_key_t</a> *sig_key, <a class="el" href="structwickr__buffer.html">wickr_buffer_t</a> *identifier)</td></tr>
<tr class="separator:ga458f74fb060fb98da491d733e51fc3ef"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga286a513a606b6643f796539413357c34"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structwickr__ctx__gen__result.html">wickr_ctx_gen_result_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wickr__ctx.html#ga286a513a606b6643f796539413357c34">wickr_ctx_gen_with_root_keys</a> (const <a class="el" href="structwickr__crypto__engine.html">wickr_crypto_engine_t</a> engine, <a class="el" href="structwickr__dev__info.html">wickr_dev_info_t</a> *dev_info, <a class="el" href="structwickr__root__keys.html">wickr_root_keys_t</a> *root_keys, <a class="el" href="structwickr__buffer.html">wickr_buffer_t</a> *identifier)</td></tr>
<tr class="separator:ga286a513a606b6643f796539413357c34"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaab0b2731d76d6ea91afd1b147c53a29a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structwickr__ctx__gen__result.html">wickr_ctx_gen_result_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wickr__ctx.html#gaab0b2731d76d6ea91afd1b147c53a29a">wickr_ctx_gen_with_passphrase</a> (const <a class="el" href="structwickr__crypto__engine.html">wickr_crypto_engine_t</a> engine, <a class="el" href="structwickr__dev__info.html">wickr_dev_info_t</a> *dev_info, <a class="el" href="structwickr__buffer.html">wickr_buffer_t</a> *exported_recovery_key, <a class="el" href="structwickr__buffer.html">wickr_buffer_t</a> *passphrase, <a class="el" href="structwickr__buffer.html">wickr_buffer_t</a> *recovery_data, <a class="el" href="structwickr__buffer.html">wickr_buffer_t</a> *identifier)</td></tr>
<tr class="separator:gaab0b2731d76d6ea91afd1b147c53a29a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2e9c63af0e76f1977844ea2dc895e90a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structwickr__ctx__gen__result.html">wickr_ctx_gen_result_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wickr__ctx.html#ga2e9c63af0e76f1977844ea2dc895e90a">wickr_ctx_gen_with_recovery</a> (const <a class="el" href="structwickr__crypto__engine.html">wickr_crypto_engine_t</a> engine, <a class="el" href="structwickr__dev__info.html">wickr_dev_info_t</a> *dev_info, <a class="el" href="structwickr__buffer.html">wickr_buffer_t</a> *recovery_data, <a class="el" href="structwickr__cipher__key.html">wickr_cipher_key_t</a> *recovery_key, <a class="el" href="structwickr__buffer.html">wickr_buffer_t</a> *identifier)</td></tr>
<tr class="separator:ga2e9c63af0e76f1977844ea2dc895e90a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2dadd40adc0217dd337ee6cf745cbc12"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structwickr__buffer.html">wickr_buffer_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wickr__ctx.html#ga2dadd40adc0217dd337ee6cf745cbc12">wickr_ctx_gen_export_recovery_key_passphrase</a> (const <a class="el" href="structwickr__ctx__gen__result.html">wickr_ctx_gen_result_t</a> *result, const <a class="el" href="structwickr__buffer.html">wickr_buffer_t</a> *passphrase)</td></tr>
<tr class="separator:ga2dadd40adc0217dd337ee6cf745cbc12"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa32727731391f1e3fbde26094924b533"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structwickr__buffer.html">wickr_buffer_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wickr__ctx.html#gaa32727731391f1e3fbde26094924b533">wickr_ctx_gen_result_make_recovery</a> (const <a class="el" href="structwickr__ctx__gen__result.html">wickr_ctx_gen_result_t</a> *result)</td></tr>
<tr class="separator:gaa32727731391f1e3fbde26094924b533"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0bde95494141673604b9e4e1f7954e2c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structwickr__root__keys.html">wickr_root_keys_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wickr__ctx.html#ga0bde95494141673604b9e4e1f7954e2c">wickr_ctx_gen_import_recovery</a> (const <a class="el" href="structwickr__crypto__engine.html">wickr_crypto_engine_t</a> engine, const <a class="el" href="structwickr__buffer.html">wickr_buffer_t</a> *recovery_data, const <a class="el" href="structwickr__cipher__key.html">wickr_cipher_key_t</a> *recovery_key)</td></tr>
<tr class="separator:ga0bde95494141673604b9e4e1f7954e2c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae095a8cb40d209090212136f8580dc77"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structwickr__ctx__gen__result.html">wickr_ctx_gen_result_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wickr__ctx.html#gae095a8cb40d209090212136f8580dc77">wickr_ctx_gen_result_copy</a> (const <a class="el" href="structwickr__ctx__gen__result.html">wickr_ctx_gen_result_t</a> *source)</td></tr>
<tr class="separator:gae095a8cb40d209090212136f8580dc77"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga865854408d22e4697eebe5bc129cc6b1"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wickr__ctx.html#ga865854408d22e4697eebe5bc129cc6b1">wickr_ctx_gen_result_destroy</a> (<a class="el" href="structwickr__ctx__gen__result.html">wickr_ctx_gen_result_t</a> **result)</td></tr>
<tr class="separator:ga865854408d22e4697eebe5bc129cc6b1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga085975d71519bf5729a7cf264a5f7876"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structwickr__ctx.html">wickr_ctx_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wickr__ctx.html#ga085975d71519bf5729a7cf264a5f7876">wickr_ctx_create</a> (const <a class="el" href="structwickr__crypto__engine.html">wickr_crypto_engine_t</a> engine, <a class="el" href="structwickr__dev__info.html">wickr_dev_info_t</a> *dev_info, <a class="el" href="structwickr__identity__chain.html">wickr_identity_chain_t</a> *id_chain, <a class="el" href="structwickr__storage__keys.html">wickr_storage_keys_t</a> *storage_keys)</td></tr>
<tr class="separator:ga085975d71519bf5729a7cf264a5f7876"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaaa74a32619fb3b382fbeeeddc425a910"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structwickr__ctx.html">wickr_ctx_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wickr__ctx.html#gaaa74a32619fb3b382fbeeeddc425a910">wickr_ctx_copy</a> (const <a class="el" href="structwickr__ctx.html">wickr_ctx_t</a> *ctx)</td></tr>
<tr class="separator:gaaa74a32619fb3b382fbeeeddc425a910"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaadfdef183c86992efc33b0d730c90327"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wickr__ctx.html#gaadfdef183c86992efc33b0d730c90327">wickr_ctx_destroy</a> (<a class="el" href="structwickr__ctx.html">wickr_ctx_t</a> **ctx)</td></tr>
<tr class="separator:gaadfdef183c86992efc33b0d730c90327"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gafe05cea0e43f65663a2b084efeedcde8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structwickr__buffer.html">wickr_buffer_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wickr__ctx.html#gafe05cea0e43f65663a2b084efeedcde8">wickr_ctx_serialize</a> (const <a class="el" href="structwickr__ctx.html">wickr_ctx_t</a> *ctx)</td></tr>
<tr class="separator:gafe05cea0e43f65663a2b084efeedcde8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf80d28fc692d102996cdaf05cfdc4c7c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structwickr__ctx.html">wickr_ctx_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wickr__ctx.html#gaf80d28fc692d102996cdaf05cfdc4c7c">wickr_ctx_create_from_buffer</a> (const <a class="el" href="structwickr__crypto__engine.html">wickr_crypto_engine_t</a> engine, <a class="el" href="structwickr__dev__info.html">wickr_dev_info_t</a> *dev_info, const <a class="el" href="structwickr__buffer.html">wickr_buffer_t</a> *buffer)</td></tr>
<tr class="separator:gaf80d28fc692d102996cdaf05cfdc4c7c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga56c41d96d28a8a25336147248361dcb6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structwickr__buffer.html">wickr_buffer_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wickr__ctx.html#ga56c41d96d28a8a25336147248361dcb6">wickr_ctx_export</a> (const <a class="el" href="structwickr__ctx.html">wickr_ctx_t</a> *ctx, const <a class="el" href="structwickr__buffer.html">wickr_buffer_t</a> *passphrase)</td></tr>
<tr class="separator:ga56c41d96d28a8a25336147248361dcb6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga361e58c9f810505a7085cd91c1165391"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structwickr__ctx.html">wickr_ctx_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wickr__ctx.html#ga361e58c9f810505a7085cd91c1165391">wickr_ctx_import</a> (const <a class="el" href="structwickr__crypto__engine.html">wickr_crypto_engine_t</a> engine, <a class="el" href="structwickr__dev__info.html">wickr_dev_info_t</a> *dev_info, const <a class="el" href="structwickr__buffer.html">wickr_buffer_t</a> *exported, const <a class="el" href="structwickr__buffer.html">wickr_buffer_t</a> *passphrase)</td></tr>
<tr class="separator:ga361e58c9f810505a7085cd91c1165391"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga67e64bed3fc0a8ee550c0fc24d44c787"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structwickr__buffer.html">wickr_buffer_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wickr__ctx.html#ga67e64bed3fc0a8ee550c0fc24d44c787">wickr_ctx_export_storage_keys</a> (const <a class="el" href="structwickr__ctx.html">wickr_ctx_t</a> *ctx, const <a class="el" href="structwickr__buffer.html">wickr_buffer_t</a> *passphrase)</td></tr>
<tr class="separator:ga67e64bed3fc0a8ee550c0fc24d44c787"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae344e5202193c4b92ee2686529285fe5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structwickr__storage__keys.html">wickr_storage_keys_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wickr__ctx.html#gae344e5202193c4b92ee2686529285fe5">wickr_ctx_import_storage_keys</a> (const <a class="el" href="structwickr__crypto__engine.html">wickr_crypto_engine_t</a> engine, const <a class="el" href="structwickr__buffer.html">wickr_buffer_t</a> *exported, const <a class="el" href="structwickr__buffer.html">wickr_buffer_t</a> *passphrase)</td></tr>
<tr class="separator:gae344e5202193c4b92ee2686529285fe5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaeff6704dded2d44f689eca5ad25843f8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structwickr__cipher__result.html">wickr_cipher_result_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wickr__ctx.html#gaeff6704dded2d44f689eca5ad25843f8">wickr_ctx_cipher_local</a> (const <a class="el" href="structwickr__ctx.html">wickr_ctx_t</a> *ctx, const <a class="el" href="structwickr__buffer.html">wickr_buffer_t</a> *plaintext)</td></tr>
<tr class="separator:gaeff6704dded2d44f689eca5ad25843f8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0b985fb2cd05fb482b5ed175dfd650a0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structwickr__cipher__result.html">wickr_cipher_result_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wickr__ctx.html#ga0b985fb2cd05fb482b5ed175dfd650a0">wickr_ctx_cipher_remote</a> (const <a class="el" href="structwickr__ctx.html">wickr_ctx_t</a> *ctx, const <a class="el" href="structwickr__buffer.html">wickr_buffer_t</a> *plaintext)</td></tr>
<tr class="separator:ga0b985fb2cd05fb482b5ed175dfd650a0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gacc1038d3690ba4860b74f13239c65600"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structwickr__buffer.html">wickr_buffer_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wickr__ctx.html#gacc1038d3690ba4860b74f13239c65600">wickr_ctx_decipher_remote</a> (const <a class="el" href="structwickr__ctx.html">wickr_ctx_t</a> *ctx, const <a class="el" href="structwickr__cipher__result.html">wickr_cipher_result_t</a> *cipher_text)</td></tr>
<tr class="separator:gacc1038d3690ba4860b74f13239c65600"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga45b2531085c430942122dcbf45736e10"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structwickr__ephemeral__keypair.html">wickr_ephemeral_keypair_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wickr__ctx.html#ga45b2531085c430942122dcbf45736e10">wickr_ctx_ephemeral_keypair_gen</a> (const <a class="el" href="structwickr__ctx.html">wickr_ctx_t</a> *ctx, uint64_t key_id)</td></tr>
<tr class="separator:ga45b2531085c430942122dcbf45736e10"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8ac1e1c9a0b9802d7f259278a09df56c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structwickr__ctx__packet.html">wickr_ctx_packet_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wickr__ctx.html#ga8ac1e1c9a0b9802d7f259278a09df56c">wickr_ctx_packet_create</a> (<a class="el" href="structwickr__packet.html">wickr_packet_t</a> *packet, <a class="el" href="structwickr__identity__chain.html">wickr_identity_chain_t</a> *sender, <a class="el" href="structwickr__parse__result.html">wickr_parse_result_t</a> *parse_result)</td></tr>
<tr class="separator:ga8ac1e1c9a0b9802d7f259278a09df56c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad7063bcfca4878d290e598ed6bc22e3c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wickr__ctx.html#gad7063bcfca4878d290e598ed6bc22e3c">wickr_ctx_packet_destroy</a> (<a class="el" href="structwickr__ctx__packet.html">wickr_ctx_packet_t</a> **packet)</td></tr>
<tr class="separator:gad7063bcfca4878d290e598ed6bc22e3c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3498fb1a966dd49c1f3b806a388533ea"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structwickr__encoder__result.html">wickr_encoder_result_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wickr__ctx.html#ga3498fb1a966dd49c1f3b806a388533ea">wickr_ctx_encode_packet</a> (const <a class="el" href="structwickr__ctx.html">wickr_ctx_t</a> *ctx, const <a class="el" href="structwickr__payload.html">wickr_payload_t</a> *payload, const wickr_node_array_t *nodes)</td></tr>
<tr class="separator:ga3498fb1a966dd49c1f3b806a388533ea"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5032fb65627a509fd9486ea9696e643d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structwickr__ctx__packet.html">wickr_ctx_packet_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wickr__ctx.html#ga5032fb65627a509fd9486ea9696e643d">wickr_ctx_parse_packet</a> (const <a class="el" href="structwickr__ctx.html">wickr_ctx_t</a> *ctx, const <a class="el" href="structwickr__buffer.html">wickr_buffer_t</a> *packet_buffer, const <a class="el" href="structwickr__identity__chain.html">wickr_identity_chain_t</a> *sender)</td></tr>
<tr class="separator:ga5032fb65627a509fd9486ea9696e643d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<h2 class="groupheader">Function Documentation</h2>
<a id="gaeff6704dded2d44f689eca5ad25843f8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaeff6704dded2d44f689eca5ad25843f8">&#9670;&nbsp;</a></span>wickr_ctx_cipher_local()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structwickr__cipher__result.html">wickr_cipher_result_t</a>* wickr_ctx_cipher_local </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structwickr__ctx.html">wickr_ctx_t</a> *&#160;</td>
          <td class="paramname"><em>ctx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structwickr__buffer.html">wickr_buffer_t</a> *&#160;</td>
          <td class="paramname"><em>plaintext</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Encrypts data using the local storage key</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">ctx</td><td>the context to use for encryption </td></tr>
    <tr><td class="paramname">plaintext</td><td>the bytes to encrypt for local storage </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>'plaintext' encrypted with the context's local storage key </dd></dl>

</div>
</div>
<a id="ga0b985fb2cd05fb482b5ed175dfd650a0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga0b985fb2cd05fb482b5ed175dfd650a0">&#9670;&nbsp;</a></span>wickr_ctx_cipher_remote()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structwickr__cipher__result.html">wickr_cipher_result_t</a>* wickr_ctx_cipher_remote </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structwickr__ctx.html">wickr_ctx_t</a> *&#160;</td>
          <td class="paramname"><em>ctx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structwickr__buffer.html">wickr_buffer_t</a> *&#160;</td>
          <td class="paramname"><em>plaintext</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Encrypts data using the remote storage key</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">ctx</td><td>the context to use for encryption </td></tr>
    <tr><td class="paramname">plaintext</td><td>plaintext the bytes to encrypt for remote storage </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>'plaintext' encrypted with the context's remote storage key </dd></dl>

</div>
</div>
<a id="gaaa74a32619fb3b382fbeeeddc425a910"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaaa74a32619fb3b382fbeeeddc425a910">&#9670;&nbsp;</a></span>wickr_ctx_copy()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structwickr__ctx.html">wickr_ctx_t</a>* wickr_ctx_copy </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structwickr__ctx.html">wickr_ctx_t</a> *&#160;</td>
          <td class="paramname"><em>ctx</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Copy a context</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">ctx</td><td>the context to copy </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a newly allocated context holding a deep copy of the properties of 'ctx' </dd></dl>

</div>
</div>
<a id="ga085975d71519bf5729a7cf264a5f7876"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga085975d71519bf5729a7cf264a5f7876">&#9670;&nbsp;</a></span>wickr_ctx_create()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structwickr__ctx.html">wickr_ctx_t</a>* wickr_ctx_create </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structwickr__crypto__engine.html">wickr_crypto_engine_t</a>&#160;</td>
          <td class="paramname"><em>engine</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structwickr__dev__info.html">wickr_dev_info_t</a> *&#160;</td>
          <td class="paramname"><em>dev_info</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structwickr__identity__chain.html">wickr_identity_chain_t</a> *&#160;</td>
          <td class="paramname"><em>id_chain</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structwickr__storage__keys.html">wickr_storage_keys_t</a> *&#160;</td>
          <td class="paramname"><em>storage_keys</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Create a context from components</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">engine</td><td>a crypto engine to support context operations </td></tr>
    <tr><td class="paramname">dev_info</td><td>the device information the context should be bound to </td></tr>
    <tr><td class="paramname">id_chain</td><td>the identity chain that belongs to this context and will be used for encoding / decoding messages </td></tr>
    <tr><td class="paramname">storage_keys</td><td>the storage keys used for local and remote ciphers of this context </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a newly allocated context owning the passed in parameters </dd></dl>

</div>
</div>
<a id="gaf80d28fc692d102996cdaf05cfdc4c7c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaf80d28fc692d102996cdaf05cfdc4c7c">&#9670;&nbsp;</a></span>wickr_ctx_create_from_buffer()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structwickr__ctx.html">wickr_ctx_t</a>* wickr_ctx_create_from_buffer </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structwickr__crypto__engine.html">wickr_crypto_engine_t</a>&#160;</td>
          <td class="paramname"><em>engine</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structwickr__dev__info.html">wickr_dev_info_t</a> *&#160;</td>
          <td class="paramname"><em>dev_info</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structwickr__buffer.html">wickr_buffer_t</a> *&#160;</td>
          <td class="paramname"><em>buffer</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Recreate a context from a serizlied representation</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">engine</td><td>a crypto engine to support context operations </td></tr>
    <tr><td class="paramname">dev_info</td><td>the device information the context should be bound to </td></tr>
    <tr><td class="paramname">buffer</td><td>data created with 'wickr_ctx_serialize' </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a context restored from 'buffer' or NULL if parsing fails </dd></dl>

</div>
</div>
<a id="gacc1038d3690ba4860b74f13239c65600"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gacc1038d3690ba4860b74f13239c65600">&#9670;&nbsp;</a></span>wickr_ctx_decipher_remote()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structwickr__buffer.html">wickr_buffer_t</a>* wickr_ctx_decipher_remote </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structwickr__ctx.html">wickr_ctx_t</a> *&#160;</td>
          <td class="paramname"><em>ctx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structwickr__cipher__result.html">wickr_cipher_result_t</a> *&#160;</td>
          <td class="paramname"><em>cipher_text</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Decrypts data using the local storage key</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">ctx</td><td>the context to use for decryption </td></tr>
    <tr><td class="paramname">cipher_text</td><td>a cipher result from 'wickr_ctx_cipher_remote' </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>'cipher_text' decoded with remote storage key </dd></dl>

</div>
</div>
<a id="gaadfdef183c86992efc33b0d730c90327"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaadfdef183c86992efc33b0d730c90327">&#9670;&nbsp;</a></span>wickr_ctx_destroy()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void wickr_ctx_destroy </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structwickr__ctx.html">wickr_ctx_t</a> **&#160;</td>
          <td class="paramname"><em>ctx</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Destroy a context</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">ctx</td><td>a pointer to the context to destroy. All properties of '*ctx' will also be destroyed </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga3498fb1a966dd49c1f3b806a388533ea"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga3498fb1a966dd49c1f3b806a388533ea">&#9670;&nbsp;</a></span>wickr_ctx_encode_packet()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structwickr__encoder__result.html">wickr_encoder_result_t</a>* wickr_ctx_encode_packet </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structwickr__ctx.html">wickr_ctx_t</a> *&#160;</td>
          <td class="paramname"><em>ctx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structwickr__payload.html">wickr_payload_t</a> *&#160;</td>
          <td class="paramname"><em>payload</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const wickr_node_array_t *&#160;</td>
          <td class="paramname"><em>nodes</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Encode a Wickr packet to a set of nodes</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">ctx</td><td>the context to use to encode 'payload' to 'nodes' </td></tr>
    <tr><td class="paramname">payload</td><td>the metadata and body information to send to 'nodes' </td></tr>
    <tr><td class="paramname">nodes</td><td>the recipient nodes for this packet </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>an encode result containing an encrypted Wickr packet that transfers 'payload' to 'nodes' </dd></dl>

</div>
</div>
<a id="ga45b2531085c430942122dcbf45736e10"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga45b2531085c430942122dcbf45736e10">&#9670;&nbsp;</a></span>wickr_ctx_ephemeral_keypair_gen()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structwickr__ephemeral__keypair.html">wickr_ephemeral_keypair_t</a>* wickr_ctx_ephemeral_keypair_gen </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structwickr__ctx.html">wickr_ctx_t</a> *&#160;</td>
          <td class="paramname"><em>ctx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint64_t&#160;</td>
          <td class="paramname"><em>key_id</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Generate ephemeral message keypairs</p>
<p>NOTE: the result of this function should be kept in a local cache to allow for decoding a message that was created with it's public components. The public buffer of the contained EC key, along with the key_id, and the key signature should be published to a pool for consumption and use by a sender looking to addresss a message to this context</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">ctx</td><td>the context to use for ephemeral key pair generation </td></tr>
    <tr><td class="paramname">key_id</td><td>the identifier to assign to the generated keypair </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>an ephemeral key pair containing the private and public components, signed by the ctx node signing identity </dd></dl>

</div>
</div>
<a id="ga56c41d96d28a8a25336147248361dcb6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga56c41d96d28a8a25336147248361dcb6">&#9670;&nbsp;</a></span>wickr_ctx_export()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structwickr__buffer.html">wickr_buffer_t</a>* wickr_ctx_export </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structwickr__ctx.html">wickr_ctx_t</a> *&#160;</td>
          <td class="paramname"><em>ctx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structwickr__buffer.html">wickr_buffer_t</a> *&#160;</td>
          <td class="paramname"><em>passphrase</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Serialize and encrypt a context with a passphrase</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">ctx</td><td>the context to serialize and encrypt </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>bytes representing an scrypt encrypted context </dd></dl>

</div>
</div>
<a id="ga67e64bed3fc0a8ee550c0fc24d44c787"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga67e64bed3fc0a8ee550c0fc24d44c787">&#9670;&nbsp;</a></span>wickr_ctx_export_storage_keys()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structwickr__buffer.html">wickr_buffer_t</a>* wickr_ctx_export_storage_keys </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structwickr__ctx.html">wickr_ctx_t</a> *&#160;</td>
          <td class="paramname"><em>ctx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structwickr__buffer.html">wickr_buffer_t</a> *&#160;</td>
          <td class="paramname"><em>passphrase</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Exports storage keys for a context using a KDF + CIPHER function</p>
<p>For more information on the KDF + CIPHER functionality, review documentation for 'wickr_crypto_engine_kdf_cipher'</p>
<p>Defaults are currently using KDF_SCRYPT_2_17 for a KDF and CIPHER_AES256_GCM for a cipher</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">ctx</td><td>the context to export storage keys from </td></tr>
    <tr><td class="paramname">passphrase</td><td>the passphrase to use as input to a KDF that will generated a key to protect storage keys </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a buffer containing exported storage keys </dd></dl>

</div>
</div>
<a id="ga2dadd40adc0217dd337ee6cf745cbc12"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga2dadd40adc0217dd337ee6cf745cbc12">&#9670;&nbsp;</a></span>wickr_ctx_gen_export_recovery_key_passphrase()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structwickr__buffer.html">wickr_buffer_t</a>* wickr_ctx_gen_export_recovery_key_passphrase </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structwickr__ctx__gen__result.html">wickr_ctx_gen_result_t</a> *&#160;</td>
          <td class="paramname"><em>result</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structwickr__buffer.html">wickr_buffer_t</a> *&#160;</td>
          <td class="paramname"><em>passphrase</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Exports the recovery key using a KDF + CIPHER function</p>
<p>For more information on the KDF + CIPHER functionality, review documentation for 'wickr_crypto_engine_kdf_cipher'</p>
<p>Defaults are currently using KDF_SCRYPT_2_17 for a KDF and CIPHER_AES256_GCM for a cipher</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">result</td><td>a context generation result to export the recovery key from </td></tr>
    <tr><td class="paramname">passphrase</td><td>the passphrase to use as input to the KDF function </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a buffer that was created by first taking KDF(randomSalt || passphrase) and then using that output as a key that encrypted </dd></dl>

</div>
</div>
<a id="ga0bde95494141673604b9e4e1f7954e2c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga0bde95494141673604b9e4e1f7954e2c">&#9670;&nbsp;</a></span>wickr_ctx_gen_import_recovery()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structwickr__root__keys.html">wickr_root_keys_t</a>* wickr_ctx_gen_import_recovery </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structwickr__crypto__engine.html">wickr_crypto_engine_t</a>&#160;</td>
          <td class="paramname"><em>engine</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structwickr__buffer.html">wickr_buffer_t</a> *&#160;</td>
          <td class="paramname"><em>recovery_data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structwickr__cipher__key.html">wickr_cipher_key_t</a> *&#160;</td>
          <td class="paramname"><em>recovery_key</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">engine</td><td>a crypto engine that was used to call 'wickr_ctx_gen_result_make_recovery' </td></tr>
    <tr><td class="paramname">recovery_data</td><td>an encrypted recovery as created by 'wickr_ctx_gen_result_make_recovery' </td></tr>
    <tr><td class="paramname">recovery_key</td><td>the recovery key from the '<a class="el" href="structwickr__ctx__gen__result.html" title="the output of a context generation">wickr_ctx_gen_result</a>' that called 'wickr_ctx_gen_result_make_recovery' to make 'recovery' </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>root keys created from decoding 'recovery' with 'recovery_key' or NULL if the decryption operation failed </dd></dl>

</div>
</div>
<a id="gaa8904ab3687a22f8d291f5976d05a0e5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaa8904ab3687a22f8d291f5976d05a0e5">&#9670;&nbsp;</a></span>wickr_ctx_gen_new()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structwickr__ctx__gen__result.html">wickr_ctx_gen_result_t</a>* wickr_ctx_gen_new </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structwickr__crypto__engine.html">wickr_crypto_engine_t</a>&#160;</td>
          <td class="paramname"><em>engine</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structwickr__dev__info.html">wickr_dev_info_t</a> *&#160;</td>
          <td class="paramname"><em>dev_info</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structwickr__buffer.html">wickr_buffer_t</a> *&#160;</td>
          <td class="paramname"><em>identifier</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Makes a new root and random node identity + context with random keys</p>
<p>NOTE: The resulting <a class="el" href="structwickr__ctx__gen__result.html" title="the output of a context generation">wickr_ctx_gen_result</a> does not gain ownership over the parameters to this function</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">engine</td><td>the crypto engine to use for all context operations </td></tr>
    <tr><td class="paramname">dev_info</td><td>the device info for which to bind this context to </td></tr>
    <tr><td class="paramname">identifier</td><td>a system unique identifier that will represent the root identity that is being generated </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a generation result containing a root identity represented by 'identifier' and a node identity signed by 'root' with a random set of keys </dd></dl>

</div>
</div>
<a id="ga458f74fb060fb98da491d733e51fc3ef"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga458f74fb060fb98da491d733e51fc3ef">&#9670;&nbsp;</a></span>wickr_ctx_gen_new_with_sig_key()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structwickr__ctx__gen__result.html">wickr_ctx_gen_result_t</a>* wickr_ctx_gen_new_with_sig_key </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structwickr__crypto__engine.html">wickr_crypto_engine_t</a>&#160;</td>
          <td class="paramname"><em>engine</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structwickr__dev__info.html">wickr_dev_info_t</a> *&#160;</td>
          <td class="paramname"><em>dev_info</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structwickr__ec__key.html">wickr_ec_key_t</a> *&#160;</td>
          <td class="paramname"><em>sig_key</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structwickr__buffer.html">wickr_buffer_t</a> *&#160;</td>
          <td class="paramname"><em>identifier</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Makes a new root and random node identity + context with random keys except for a provided root signing key</p>
<p>NOTE: The resulting <a class="el" href="structwickr__ctx__gen__result.html" title="the output of a context generation">wickr_ctx_gen_result</a> does not gain ownership over the parameters to this function</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">engine</td><td>the crypto engine to use for all context operations </td></tr>
    <tr><td class="paramname">dev_info</td><td>the device info for which to bind this context to </td></tr>
    <tr><td class="paramname">sig_key</td><td>a signature key to associate with the generated root identity </td></tr>
    <tr><td class="paramname">identifier</td><td>a system unique identifier that will represent the root identity that is being generated </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a generation result containing a root identity represented by 'identifier' and a node identity signed by 'root' with 'sig_key' as the root signing key </dd></dl>

</div>
</div>
<a id="gae095a8cb40d209090212136f8580dc77"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gae095a8cb40d209090212136f8580dc77">&#9670;&nbsp;</a></span>wickr_ctx_gen_result_copy()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structwickr__ctx__gen__result.html">wickr_ctx_gen_result_t</a>* wickr_ctx_gen_result_copy </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structwickr__ctx__gen__result.html">wickr_ctx_gen_result_t</a> *&#160;</td>
          <td class="paramname"><em>source</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Copy a context generation result</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">source</td><td>the context generation result to copy </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a newly allocated context generation result holding a deep copy of the properties of 'source' </dd></dl>

</div>
</div>
<a id="ga865854408d22e4697eebe5bc129cc6b1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga865854408d22e4697eebe5bc129cc6b1">&#9670;&nbsp;</a></span>wickr_ctx_gen_result_destroy()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void wickr_ctx_gen_result_destroy </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structwickr__ctx__gen__result.html">wickr_ctx_gen_result_t</a> **&#160;</td>
          <td class="paramname"><em>result</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Destroy a context generation result</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">result</td><td>a pointer to the context generation result to destroy. All properties of '*result' will also be destroyed </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gaa32727731391f1e3fbde26094924b533"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaa32727731391f1e3fbde26094924b533">&#9670;&nbsp;</a></span>wickr_ctx_gen_result_make_recovery()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structwickr__buffer.html">wickr_buffer_t</a>* wickr_ctx_gen_result_make_recovery </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structwickr__ctx__gen__result.html">wickr_ctx_gen_result_t</a> *&#160;</td>
          <td class="paramname"><em>result</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Serializes root keys and ciphers them with the recovery key</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">result</td><td>the context generation result to make an recovery from </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a buffer with a serialized cipher_result generated by encrypting 'root_keys' with the 'recovery_key' held in 'result'. </dd></dl>

</div>
</div>
<a id="gaab0b2731d76d6ea91afd1b147c53a29a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaab0b2731d76d6ea91afd1b147c53a29a">&#9670;&nbsp;</a></span>wickr_ctx_gen_with_passphrase()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structwickr__ctx__gen__result.html">wickr_ctx_gen_result_t</a>* wickr_ctx_gen_with_passphrase </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structwickr__crypto__engine.html">wickr_crypto_engine_t</a>&#160;</td>
          <td class="paramname"><em>engine</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structwickr__dev__info.html">wickr_dev_info_t</a> *&#160;</td>
          <td class="paramname"><em>dev_info</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structwickr__buffer.html">wickr_buffer_t</a> *&#160;</td>
          <td class="paramname"><em>exported_recovery_key</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structwickr__buffer.html">wickr_buffer_t</a> *&#160;</td>
          <td class="paramname"><em>passphrase</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structwickr__buffer.html">wickr_buffer_t</a> *&#160;</td>
          <td class="paramname"><em>recovery_data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structwickr__buffer.html">wickr_buffer_t</a> *&#160;</td>
          <td class="paramname"><em>identifier</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Makes a new context using an existing root identity's exported recovery key and a passphrase</p>
<p>NOTE: The resulting <a class="el" href="structwickr__ctx__gen__result.html" title="the output of a context generation">wickr_ctx_gen_result</a> does not gain ownership over the parameters to this function</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">engine</td><td>the crypto engine to use for all context operations </td></tr>
    <tr><td class="paramname">dev_info</td><td>the device info for which to bind this context to </td></tr>
    <tr><td class="paramname">exported_recovery_key</td><td>a previously exported random recovery key that was protected with a KDF using 'passphrase' as the key. See 'wickr_ctx_gen_export_recovery_key_passphrase' for more information </td></tr>
    <tr><td class="paramname">passphrase</td><td>the passphrase to decode exported_recovery_key with </td></tr>
    <tr><td class="paramname">recovery_data</td><td>an export of 'root_keys' from a previous context encrypted with recovery_key </td></tr>
    <tr><td class="paramname">identifier</td><td>identifier the system unique identifier that was previously associated with the root keys held in 'recovery' </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a generation result containing an existing root identity represented by 'identifier' and a node identity signed by the existing root. NULL if decoding 'exported_recovery_key' or 'recovery' fails due to an invalid passphrase </dd></dl>

</div>
</div>
<a id="ga2e9c63af0e76f1977844ea2dc895e90a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga2e9c63af0e76f1977844ea2dc895e90a">&#9670;&nbsp;</a></span>wickr_ctx_gen_with_recovery()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structwickr__ctx__gen__result.html">wickr_ctx_gen_result_t</a>* wickr_ctx_gen_with_recovery </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structwickr__crypto__engine.html">wickr_crypto_engine_t</a>&#160;</td>
          <td class="paramname"><em>engine</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structwickr__dev__info.html">wickr_dev_info_t</a> *&#160;</td>
          <td class="paramname"><em>dev_info</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structwickr__buffer.html">wickr_buffer_t</a> *&#160;</td>
          <td class="paramname"><em>recovery_data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structwickr__cipher__key.html">wickr_cipher_key_t</a> *&#160;</td>
          <td class="paramname"><em>recovery_key</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structwickr__buffer.html">wickr_buffer_t</a> *&#160;</td>
          <td class="paramname"><em>identifier</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Makes a new context using an existing exported root keys and a provided recovery key</p>
<p>NOTE: The resulting <a class="el" href="structwickr__ctx__gen__result.html" title="the output of a context generation">wickr_ctx_gen_result</a> does not gain ownership over the parameters to this function</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">engine</td><td>the crypto engine to use for all context operations </td></tr>
    <tr><td class="paramname">dev_info</td><td>the device info for which to bind this context to </td></tr>
    <tr><td class="paramname">recovery_data</td><td>an recovery containing exported root_keys from a previous context using 'recovery_key' </td></tr>
    <tr><td class="paramname">recovery_key</td><td>the key to decrypt 'recovery' with to attempt recovery of root_keys to use for context generation </td></tr>
    <tr><td class="paramname">identifier</td><td>identifier the system unique identifier that was previously associated with the root keys held in 'recovery' </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a generation result containing an existing root identity represented by 'identifier' and a node identity signed by the existing root. NULL if decoding 'recovery' fails due to an incorrect key </dd></dl>

</div>
</div>
<a id="ga286a513a606b6643f796539413357c34"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga286a513a606b6643f796539413357c34">&#9670;&nbsp;</a></span>wickr_ctx_gen_with_root_keys()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structwickr__ctx__gen__result.html">wickr_ctx_gen_result_t</a>* wickr_ctx_gen_with_root_keys </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structwickr__crypto__engine.html">wickr_crypto_engine_t</a>&#160;</td>
          <td class="paramname"><em>engine</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structwickr__dev__info.html">wickr_dev_info_t</a> *&#160;</td>
          <td class="paramname"><em>dev_info</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structwickr__root__keys.html">wickr_root_keys_t</a> *&#160;</td>
          <td class="paramname"><em>root_keys</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structwickr__buffer.html">wickr_buffer_t</a> *&#160;</td>
          <td class="paramname"><em>identifier</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Makes a new context using an existing root keys set</p>
<p>NOTE: The resulting <a class="el" href="structwickr__ctx__gen__result.html" title="the output of a context generation">wickr_ctx_gen_result</a> does not gain ownership over the parameters to this function</p>
<p>This function is used to provision a new node identity onto the system given an existing root identity</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">engine</td><td>the crypto engine to use for all context operations </td></tr>
    <tr><td class="paramname">dev_info</td><td>the device info for which to bind this context to </td></tr>
    <tr><td class="paramname">root_keys</td><td>the root keys to use for the generation, the generated node will be signed by the root key's signing key, and the storage keys will be derived from the root remote / local cipher keys </td></tr>
    <tr><td class="paramname">identifier</td><td>the system unique identifier that was previously associated with root_keys </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a generation result containing an existing root identity represented by 'identifier' and a node identity signed by the existing root </dd></dl>

</div>
</div>
<a id="ga361e58c9f810505a7085cd91c1165391"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga361e58c9f810505a7085cd91c1165391">&#9670;&nbsp;</a></span>wickr_ctx_import()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structwickr__ctx.html">wickr_ctx_t</a>* wickr_ctx_import </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structwickr__crypto__engine.html">wickr_crypto_engine_t</a>&#160;</td>
          <td class="paramname"><em>engine</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structwickr__dev__info.html">wickr_dev_info_t</a> *&#160;</td>
          <td class="paramname"><em>dev_info</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structwickr__buffer.html">wickr_buffer_t</a> *&#160;</td>
          <td class="paramname"><em>exported</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structwickr__buffer.html">wickr_buffer_t</a> *&#160;</td>
          <td class="paramname"><em>passphrase</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Import a ctx exported by 'wickr_ctx_export'</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">engine</td><td>the crypto engine to use for decryption and the resulting context </td></tr>
    <tr><td class="paramname">dev_info</td><td>the device information the context should be bound to </td></tr>
    <tr><td class="paramname">exported</td><td>the result of the call to 'wickr_ctx_export' </td></tr>
    <tr><td class="paramname">passphase</td><td>the passphrase used to export the context </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gae344e5202193c4b92ee2686529285fe5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gae344e5202193c4b92ee2686529285fe5">&#9670;&nbsp;</a></span>wickr_ctx_import_storage_keys()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structwickr__storage__keys.html">wickr_storage_keys_t</a>* wickr_ctx_import_storage_keys </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structwickr__crypto__engine.html">wickr_crypto_engine_t</a>&#160;</td>
          <td class="paramname"><em>engine</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structwickr__buffer.html">wickr_buffer_t</a> *&#160;</td>
          <td class="paramname"><em>exported</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structwickr__buffer.html">wickr_buffer_t</a> *&#160;</td>
          <td class="paramname"><em>passphrase</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Import storage keys exported with 'wickr_ctx_export_storage_keys'</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">engine</td><td>a crypto engine supporting KDF based encryption </td></tr>
    <tr><td class="paramname">exported</td><td>keys exported with 'wickr_ctx_export_storage_keys' </td></tr>
    <tr><td class="paramname">passphrase</td><td>the passphrase used to export storage keys </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>decoded storage keys or NULL if the passphrase is invalid </dd></dl>

</div>
</div>
<a id="ga8ac1e1c9a0b9802d7f259278a09df56c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga8ac1e1c9a0b9802d7f259278a09df56c">&#9670;&nbsp;</a></span>wickr_ctx_packet_create()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structwickr__ctx__packet.html">wickr_ctx_packet_t</a>* wickr_ctx_packet_create </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structwickr__packet.html">wickr_packet_t</a> *&#160;</td>
          <td class="paramname"><em>packet</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structwickr__identity__chain.html">wickr_identity_chain_t</a> *&#160;</td>
          <td class="paramname"><em>sender</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structwickr__parse__result.html">wickr_parse_result_t</a> *&#160;</td>
          <td class="paramname"><em>parse_result</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Create a context packet parse result from components</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">packet</td><td>see property description from '<a class="el" href="structwickr__ctx__packet.html" title="a parsed inbound wickr packet that has yet to be decoded by this context">wickr_ctx_packet</a>' </td></tr>
    <tr><td class="paramname">sender</td><td>see property description from '<a class="el" href="structwickr__ctx__packet.html" title="a parsed inbound wickr packet that has yet to be decoded by this context">wickr_ctx_packet</a>' </td></tr>
    <tr><td class="paramname">parse_result</td><td>see property description from '<a class="el" href="structwickr__ctx__packet.html" title="a parsed inbound wickr packet that has yet to be decoded by this context">wickr_ctx_packet</a>' </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a newly allocated context packet parse result owning the parameters passed in </dd></dl>

</div>
</div>
<a id="gad7063bcfca4878d290e598ed6bc22e3c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gad7063bcfca4878d290e598ed6bc22e3c">&#9670;&nbsp;</a></span>wickr_ctx_packet_destroy()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void wickr_ctx_packet_destroy </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structwickr__ctx__packet.html">wickr_ctx_packet_t</a> **&#160;</td>
          <td class="paramname"><em>packet</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Destroy a packet parse result</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">packet</td><td>a pointer to a context packet parse result to destroy. Will destroy the sub properties of '*packet' as well </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga5032fb65627a509fd9486ea9696e643d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga5032fb65627a509fd9486ea9696e643d">&#9670;&nbsp;</a></span>wickr_ctx_parse_packet()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structwickr__ctx__packet.html">wickr_ctx_packet_t</a>* wickr_ctx_parse_packet </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structwickr__ctx.html">wickr_ctx_t</a> *&#160;</td>
          <td class="paramname"><em>ctx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structwickr__buffer.html">wickr_buffer_t</a> *&#160;</td>
          <td class="paramname"><em>packet_buffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structwickr__identity__chain.html">wickr_identity_chain_t</a> *&#160;</td>
          <td class="paramname"><em>sender</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Parse a Wickr packet into components, fail if the current node's key exchange is not found</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">ctx</td><td>the context to use for parsing </td></tr>
    <tr><td class="paramname">packet_buffer</td><td>the buffer representing the serialized packet that was delivered to 'ctx' </td></tr>
    <tr><td class="paramname">sender</td><td>the sender of the 'packet_buffer' </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a parse result holding the parsed information from 'packet_buffer' as well as a discovered key exchange from the current ctx node_id. If the packet was not addressed to this context, an error is generated </dd></dl>

</div>
</div>
<a id="gafe05cea0e43f65663a2b084efeedcde8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gafe05cea0e43f65663a2b084efeedcde8">&#9670;&nbsp;</a></span>wickr_ctx_serialize()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structwickr__buffer.html">wickr_buffer_t</a>* wickr_ctx_serialize </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structwickr__ctx.html">wickr_ctx_t</a> *&#160;</td>
          <td class="paramname"><em>ctx</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Serialize a context</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">ctx</td><td>the context to serialize to bytes </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>bytes representing a combination of the storage keys and id chain from 'ctx' </dd></dl>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.15
</small></address>
</body>
</html>
